<?php defined('IN_YuLin') || exit('NO PERMIT!'); ?>
{template index/header}
<div class="subnav" style="margin-bottom:20px;">
    <a href="">首页</a> &gt; <a href="">客户管理</a> &gt; <a href="">在线会员</a>
</div>
<div class="x-body">
	<div id="searchid" class="layui-clear" >
		<form name="searchform" class="layui-form" action="?" method="get" >
			<input type="hidden" name="m" value="{$m}" />
			<input type="hidden" name="c" value="{$c}" />
			<input type="hidden" name="a" value="{$a}" />
		 
			<div class="left margin-l10" style="margin-bottom:20px;">
				 <input name="dt1" id="dt1" type="text" value="{$dt1}" class="layui-input date"  placeholder="会员账号" />
			</div>
			
			<div class="left margin-l10">
				<input type="submit" name="search" class="layui-btn" value="搜索" />
			</div>
		
		</form>
	</div>
	
	<table class="layui-table">
		<thead>
			<tr>
				<th> 会员账号</th>
				<th>在线终端</th>
				<th>登陆时间</th>
				<th>操作时间</th>
				<th>登陆IP</th>
				<th>登陆地区</th>
								
			</tr>
		</thead>
		<tbody id="datalist">
			{loop $data as $val}
			<tr>
				<td><a href="?m={$m}&c={$c}&upuid={$val['upuid']}">{$upuids[$val['upuid']]['username']}</a></td>
				<td>{$val['username']}</td>
				<td>{$val['nickname']}</td>
				<td>{$gids[$val['gid']]}</td>
				<td>{$val['money']}</td>
				<td>{$val['rebate']}%</td>
				<td>{date('Y/m/d H:i:s',$val['reg_time'])}</td>
				<td>{$val['reg_ip']}</td>
				<td>{$val['last_ip']}</td>
				<td><a href="?m={$m}&c={$c}&upuid={$val['id']}">{$val['sons']}</a></td>
				<td>
					<select onchange="SetUserStatus({$val['id']},this)">
						{loop $statuss as $sk => $sv}
						<option value="{$sk}"{if $sk == $val['status']} selected="selected"{/if}>{$sv}</option>
						{/loop}
					</select>
				</td>
				<td>{$val['id']}</td>
				<td>
					<a href="?m={$m}&c={$c}&a=add&id={$val['id']}">编辑</a>
					<!--<a href="?m={$m}&c=bank&uid={$val['id']}">配额设置</a>-->
					<a href="?m={$m}&c=bank&uid={$val['id']}">银行卡</a>
					<a href="?m={$m}&c={$c}&a=view&uid={$val['id']}" class="a-dialog" data-width="1000px" data-height="500px;">用户详情</a>
					<!--<a href="?m={$m}&c=bank&uid={$val['id']}">彩票设定</a>-->
					<!--<a href="?m={$m}&c=bank&uid={$val['id']}">新增下级</a>-->
					<!--<a href="?m={$m}&c=bank&uid={$val['id']}">游戏管理</a>-->
					<a href="?m={$m}&c=order&uid={$val['id']}" class="red a-dialog" data-full="1">下注</a>
					<a href="?m={$m}&c={$c}&a=infolog&uid={$val['id']}" class="a-dialog" data-full="1">记录</a>
					<!--<a href="?m={$m}&c=bank&uid={$val['id']}">代理QQ设置</a>-->
				</td>
			</tr>
			{/loop}
		</tbody>
	</table>
	<div class="layui-clear">
		<div id="pages" class="layui-laypage right">{$multi}</div>		
	</div>
</div>

<script>
	function SetUserStatus(id,obj)
	{
		//var index = layer.msg('状态修改中',{icon: 16,time:false,shade:0.8});
		var flag = $(obj).val();
		$.get('{U($m."/".$c."/del")}&id=' + id + '&flag=' + flag,function(res){
			//layer.close(index);
			layer.msg('状态修改成功！');
		});
	}
</script>

{template index/footer}